<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>编辑SOP</title>
    <script type="text/html" template>
        <link rel="stylesheet" href="{{ layui.setter.base }}style/inputTag.css?v={{ layui.admin.v }}-1" media="all">
    </script>
</head>
<body>
<script type="text/html" template>
    <form class="layui-form" action="">
        <input name="id" type="text" hidden value="{{d.params.id || ''}}" id="id"/>
        <div class="layui-form-item">
            <label class="layui-form-label brand-form-item-require">标题</label>
            <div class="layui-input-block">
                <input type="text" name="title" id="soptitle" lay-verify="required" autocomplete="off"
                       class="layui-input" value="{{d.params.title}}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label brand-form-item-require">类别</label>
            <div class="layui-input-block" id="categoryListContainer3">

            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label brand-form-item-require">触发词</label>
            <div class="layui-input-block">
                <input id="triggerWord2" name="triggerWord" type="text" hidden>
                <div class="fairy-tag-container" style="width: 99.9%;min-height: 22px;">
                    <input type="text" class="fairy-tag-input triggerWordTag2" autocomplete="off" value="">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label brand-form-item-require">方案</label>
            <div class="layui-input-block">
                <textarea class="sop-content2" id="content2" style="display: none;"></textarea>
            </div>

        </div>

        <div class="layui-form-item">
            <label class="layui-form-label brand-form-item-require">处理人</label>
            <div class="layui-input-block">
                <input id="handler3" name="handler" type="text" hidden>
                <div class="fairy-tag-container" style="width: 99.9%;min-height: 22px;">
                    <input type="text" class="fairy-tag-input tag3" autocomplete="off" value="">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block" style="right:100px;bottom: 20px;position: absolute;">
                <button type="button" class="layui-btn" lay-submit lay-filter="submitSopEdit">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
</script>
<script type="text/html" id="categoryListTpl3">
    <select id="categoryId" name="categoryId" lay-search="" lay-filter="categoryId" size="5">
        <option value="">直接选择或搜索选择</option>
        {{# layui.each(d.list,function(index,item){ }}
        {{# if(item.id === d.categoryId){ }}
        <option value="{{item.id}}" class="layui-this" selected>{{item.categoryName}}</option>
        {{# } else { }}
        <option value="{{item.id}}">{{item.categoryName}}</option>
        {{# } }}
        {{# }); }}
    </select>
</script>
</body>
</html>


<script>
    layui.use('sop/sopEdit', layui.factory('sop/sopEdit'));
</script>